﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wp.DAL;
using Wp.BLL;

public partial class Modules_Video_Controls_DetailVideo : System.Web.UI.UserControl
{
    public string VideoTextID { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        VideoTextID = CommonHelper.QueryString("videotextid", "");
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    void LoadData()
    {
        TblPostsEntity item = TblPostsManager.CreateInstant().SelectOneByTextId(VideoTextID, "video", true);
        if (item != null)
        {
            someFrame.Attributes.Add("src", item.Summary);
            LoadViewMore(item.Id);
        }
    }
    void LoadViewMore(int Id)
    {
        List<TblPostsEntity> ls = TblPostsManager.CreateInstant().SelectTblPostByVideoViewMore(Id, 10);
        rptviewmore.DataSource = ls;
        rptviewmore.DataBind();
    }
}